<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>兜里有糖</title><meta name="author" content="兜里有糖"><meta name="copyright" content="兜里有糖"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="兜里有糖">
<meta property="og:url" content="https://blog.cwxhmk.top/index.html">
<meta property="og:site_name" content="兜里有糖">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://image.cwxhmk.top/blog/tou.jpg">
<meta property="article:author" content="兜里有糖">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://image.cwxhmk.top/blog/tou.jpg"><link rel="shortcut icon" href="/img/favicon.png"><link rel="canonical" href="https://blog.cwxhmk.top/"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//hm.baidu.com"/><link rel="preconnect" href="//fonts.googleapis.com" crossorigin=""/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><script>var _hmt = _hmt || [];
(function() {
  var hm = document.createElement("script");
  hm.src = "https://hm.baidu.com/hm.js?a14889b83a055b58cc3b9baac0e8d397";
  var s = document.getElementsByTagName("script")[0]; 
  s.parentNode.insertBefore(hm, s);
})();
</script><link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Titillium+Web&amp;display=swap" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = { 
  root: '/',
  algolia: undefined,
  localSearch: {"path":"search.xml","languages":{"hits_empty":"找不到您查询的内容：${query}"}},
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: true,
    post: true
  },
  runtime: '天',
  date_suffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    jQuery: 'https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js',
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/js/jquery.justifiedGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/justifiedGallery/dist/css/justifiedGallery.min.css'
    },
    fancybox: {
      js: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.js',
      css: 'https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@latest/dist/jquery.fancybox.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: true,
  isanchor: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: '兜里有糖',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2022-01-04 18:31:52'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    })(window)</script><meta name="baidu-site-verification" content="code-DLRo0M1JYB" /><meta name="msvalidate.01" content="68CBEB31DECE622B51F762A579742691" /><meta name="google-site-verification" content="EbiglcFzq1VMWmp5uIo4rPO8dnEVWbr06jCFe_BGHfo" /><link rel="stylesheet" href="/css/person.css"><meta name="generator" content="Hexo 5.1.1"></head><body><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="author-avatar"><img class="avatar-img" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/tou.jpg" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="site-data"><div class="data-item is-center"><div class="data-item-link"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div></div><div class="data-item is-center"><div class="data-item-link"><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div></div></div><hr/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间线</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div></div></div><div class="page" id="body-wrap"><header class="full_page" id="page-header" style="background-image: url('https://image.cwxhmk.top/blog/background.jpg')"><nav id="nav"><span id="blog_name"><a id="site-name" href="/">兜里有糖</a></span><div id="menus"><div id="search-button"><a class="site-page social-icon search"><i class="fas fa-search fa-fw"></i><span> 搜索</span></a></div><div class="menus_items"><div class="menus_item"><a class="site-page" href="/"><i class="fa-fw fas fa-home"></i><span> 主页</span></a></div><div class="menus_item"><a class="site-page" href="/archives/"><i class="fa-fw fas fa-archive"></i><span> 时间线</span></a></div><div class="menus_item"><a class="site-page" href="/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div><div class="menus_item"><a class="site-page" href="javascript:void(0);"><i class="fa-fw fas fa-list"></i><span> 列表</span><i class="fas fa-chevron-down expand"></i></a><ul class="menus_item_child"><li><a class="site-page child" href="/music/"><i class="fa-fw fas fa-music"></i><span> 音乐</span></a></li><li><a class="site-page child" href="/Gallery/"><i class="fa-fw fas fa-images"></i><span> 照片</span></a></li><li><a class="site-page child" href="/movies/"><i class="fa-fw fas fa-video"></i><span> 电影</span></a></li></ul></div><div class="menus_item"><a class="site-page" href="/about/"><i class="fa-fw fas fa-heart"></i><span> 关于</span></a></div></div><div id="toggle-menu"><a class="site-page"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">兜里有糖</h1><div id="site-subtitle"><span id="subtitle"></span></div><div id="site_social_icons"><a class="social-icon" href="https://github.com/dlytang" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="/472548557" target="_blank" title="QQ"><i class="fab fa-qq"></i></a><a class="social-icon" href="mailto:472548557@qq.com" target="_blank" title="QQ"><i class="fab fa-envelope-o"></i></a></div></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/08/22/program/2021-08-22-coding/" title="Coding">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/coding.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Coding"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/08/22/program/2021-08-22-coding/" title="Coding">Coding</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-08-22T21:20:19.000Z" title="发表于 2021-08-22 21:20:19">2021-08-22</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">这几天看到好多人因为在Github Actions上签到续期被封仓库、甚至封号的，连忙把我续期签到的停止，最近找到了coding，也有CI/CD，正好用来签到。和Github不同，在coding里叫构建计划，配置文件也不一样，用的jenkins，其他的基本一样。机器配置：2h4g/100GB磁盘空间/Ubunt，一次最多30分钟，每个月最多1000分钟，足够了。先在coding里新建项目，新建仓库，导入或者上传代码，之后到构建计划中新建计划，配置文件就用最下面的自定义就好，默认的第一步检出意思就是从仓库中拉去代码，之后就是自己的步骤了，不过有很多内置环境比如Python3、Nodejs等，不需要自己再配置了。
上传仓库只需要改一下最后的网址就可以实现上传了
123456789stage(&quot;push&quot;) &#123;    steps &#123;        sh &#39;git add .&#39;        sh &#39;&#39;&#39;        git commit -m &quot;Update &#96;date +&quot;%Y-% ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/08/22/program/2021-08-22-linuxTowindows/" title="Linux Windows">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/linux_windows.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Linux Windows"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/08/22/program/2021-08-22-linuxTowindows/" title="Linux Windows">Linux Windows</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-08-22T21:16:19.000Z" title="发表于 2021-08-22 21:16:19">2021-08-22</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">前几天在YouTube上看到Linux系统DD成Windows，正好把我那台RN的vps换成Windows，带宽还高，美滋滋。找工具就找了好久，搜到的大部分已经失效了，应该是windows的iso下载链接失效了，最后找到了一个可以用的，MeowLove/Network-Reinstall-System-Modify，按照教程来就好，挺简单的，Windows系统选server2012，系统占的资源少。
123wget --no-check-certificate -qO ~/Network-Reinstall-System-Modify.sh &#x27;https://www.cxthhhhh.com/CXT-Library/Network-Reinstall-System-Modify/Network-Reinstall-System-Modify.sh&#x27; &amp;&amp; chmod a+x ~/Network-Reinstall-System-Modify.shbash ~/Network-Reinstall-System-Modify.sh -UI_Options ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/07/16/program/2021-07-16-wechaty/" title="Wechaty">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/wechaty.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Wechaty"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/07/16/program/2021-07-16-wechaty/" title="Wechaty">Wechaty</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-07-16T21:16:19.000Z" title="发表于 2021-07-16 21:16:19">2021-07-16</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">老早就想搞一个微信机器人了，但之前的可爱猫只能在Windows上运行，还要下载指定版本微信，怪麻烦的，想着有没有类似Mirai之类的可以挂在Linux上的机器人。这几天发现了Wechaty满足我的需要。这次有了免费的Web版的了，不需要token就可以(购买的话200RMB/月，买不起买不起)，我用的Python-wechaty，先用docker启动wechaty服务登录微信，在用python连接wechaty进行消息处理。以下教程摘自官方文档。   

启动Web协议服务
12345678910111213141516docker pull wechaty/wechaty:latestexport WECHATY_LOG=&quot;verbose&quot;export WECHATY_PUPPET=&quot;wechaty-puppet-wechat&quot;export WECHATY_PUPPET_SERVER_PORT=&quot;8080&quot;export WECHATY_TOKEN=&quot;python-wechaty-&#123;uuid&#125;&q ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/05/15/program/2021-05-15-cloudreve/" title="个人网盘">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/cloudreve.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="个人网盘"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/05/15/program/2021-05-15-cloudreve/" title="个人网盘">个人网盘</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-05-15T21:16:19.000Z" title="发表于 2021-05-15 21:16:19">2021-05-15</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">这几天看私人网盘的搭建，自己也想弄一个，就去找了教程
储存网盘最重要的部分就是储存了，网盘里会有很多文件，占用的空间也会很多，而且还要保证速度，还要便宜。作为白嫖党，最终由三个可以选择：Onedrive、Google Drive、阿里网盘前两个本以为有edu邮箱会有很大的储存空间，结果。。。
Onedirve介绍 用edu邮箱注册后确实会有1TB的储存空间，但由于国内学校一半都没有管理员，因此没有API权限，不能进行第三方挂载，也就是只能用官方的APP，有些不方便。但**Onemanager可以用sharepoint来进行挂载，搭配上Heroku和Cloudflare体验也还不错，但只能上传和预览，无法删除移动等。 
开发者意外得知 office 365 e5开发者也有5TB的空间，不过需要调用API活跃才能续期，每次三个月，可以用Github action 来刷。tips:最好再注册几个子账号来进行之后的操作，比如刷API一个账号，Cloudreve一个账号申请教程
基本流程：
先注册个人账号
完善信息
申请成为开发者，国家选择美国
点击【SET UP E5 SUBSCRIPTION ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/05/08/program/2021-05-08-docker/" title="docker">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/docker.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="docker"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/05/08/program/2021-05-08-docker/" title="docker">docker</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-05-08T20:16:19.000Z" title="发表于 2021-05-08 20:16:19">2021-05-08</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">这几天学了一下docker的相关知识，记录一下
安装官网有教程
卸载旧版本12345678sudo yum remove docker \                docker-client \                docker-client-latest \                docker-common \                docker-latest \                docker-latest-logrotate \                docker-logrotate \                docker-engine

安装新版本需要centos7版本以上的
安装一些必要的系统工具:
1sudo yum install -y yum-utils device-mapper-persistent-data lvm2
添加软件源信息：
1sudo yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/d ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2021/04/07/program/2021-04-07-autojs/" title="autojs">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/202104071.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="autojs"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/04/07/program/2021-04-07-autojs/" title="autojs">autojs</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-04-07T22:16:19.000Z" title="发表于 2021-04-07 22:16:19">2021-04-07</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">今天本来想写一个作业帮审核的脚本，本想在浏览器上用js执行，结果忘记了跨域问题，写好了发现无法进行网络请求，本已放弃，无意中看到了autojs，也是用js来写脚本，不过有专门的app，这样也不用考虑跨域问题了。以后应该还会用到，用手机来执行脚本。
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135&quot;ui&quot;; //前面不能有任何字符ui.layout(    &lt;vertical&gt;        &lt;text textS ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2021/02/13/program/2021-02-13-github_action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2/" title="Github action自动部署">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/github_action.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Github action自动部署"></a></div><div class="recent-post-info"><a class="article-title" href="/2021/02/13/program/2021-02-13-github_action%E8%87%AA%E5%8A%A8%E9%83%A8%E7%BD%B2/" title="Github action自动部署">Github action自动部署</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2021-02-13T21:36:19.000Z" title="发表于 2021-02-13 21:36:19">2021-02-13</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">前言前几天看到了GitHub action可以自动运行代码，试了一下Python，感觉不错，之后想到博客之前挂掉了，可以用这个来自动部署，于是搜了一下，果然有很多教程，但我还是弄了好久，记一下采坑过程。一共两个仓库，一个Hexo源文件+action，一个网站HTML等文件，用于访问。
配置私钥公钥因为换了电脑，之前的环境什么的都没有了，得重新生成。生成过程一直回车就好了。

私钥的配置：将生成的 private key 作为 Hexo 源文件仓库 Settings &gt; Secrets 的 一个名叫 DEPLOY_KEY 的 Secret。注意：需要复制包括 -----BEGIN OPENSSH PRIVATE KEY----- 和 -----END OPENSSH PRIVATE KEY----- 的整个内容。Secret 相当于一个变量，可以使私有变量不公开。

公钥的配置：直接在这个链接点击那个new SSH key就可配置


添加Github action12345678910111213141516171819202122232425262728293031323334 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2020/09/18/program/2020-09-18-jupyter/" title="Jupyter搭建">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/jupyter.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Jupyter搭建"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/09/18/program/2020-09-18-jupyter/" title="Jupyter搭建">Jupyter搭建</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-09-18T21:00:42.000Z" title="发表于 2020-09-18 21:00:42">2020-09-18</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">利用Jupyter搭建在线Python编辑器  
1. 创建虚拟环境123456789$ pip install virtualenv$ ln -s /usr/local/python3/bin/virtualenv /usr/bin/virtualenv$ mkdir jupyter                     #创建jupyter文件夹$ cd jupyter$ virtualenv venv                       #创建venv文件夹New python executable in venv/bin/pythonInstalling distribute............done.$ source venv/bin/activate            #激活虚拟环境

2.安装Jupyter1$ pip install jupyter 

3.配置 Jupyter Notebook生成配置文件,文件在 /root/.jupyter/jupyter_notebook_config.py
1$ jupyter notebook --gene ...</div></div></div><div class="recent-post-item"><div class="post_cover left_radius"><a href="/2020/08/24/program/2020-08-24-%E9%83%A8%E7%BD%B2/" title="部署">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/gunicron.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="部署"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/24/program/2020-08-24-%E9%83%A8%E7%BD%B2/" title="部署">部署</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-24T22:11:42.000Z" title="发表于 2020-08-24 22:11:42">2020-08-24</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">gunicron安装1pip install gunicron 
使用的目录在
1&#x2F;usr&#x2F;local&#x2F;python3&#x2F;bin&#x2F;gunicorn
参数
-w: 代表启动4个进程，可以通过ps -ef | grep 9001可以看到四个PID；-b: 打标绑定的IP和端口号,0.0.0.1表示不仅仅能在本台机器上访问，外网也可以访问，绑定的为9001端口wsgi:app, wsgi代表文件名，app为对应到该文件中创建的Flask对象此外还有其他参数:–log-level LEVEL:表示日志级别，测试可以用DEBUG–timeout: 超时时间，单位是秒

启动1234#直接执行gunicorn -w 4 -b 127.0.0.1:5000 app:app #通过配置文件执行gunicorn -c config.py app:app
假如gunicorn命令不存在 可以用虚拟环境
关闭123#查看进程树pstree -ap|grep gunicornkill 进程即可退出 进程在&#x2F;log&#x2F;pid文件中

虚拟环境安装 ...</div></div></div><div class="recent-post-item"><div class="post_cover right_radius"><a href="/2020/08/24/program/2020-08-24-%E5%B9%B6%E5%8F%91%E6%B5%8B%E8%AF%95/" title="并发测试">     <img class="post_bg" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/default_cover.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="并发测试"></a></div><div class="recent-post-info"><a class="article-title" href="/2020/08/24/program/2020-08-24-%E5%B9%B6%E5%8F%91%E6%B5%8B%E8%AF%95/" title="并发测试">并发测试</a><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2020-08-24T22:10:42.000Z" title="发表于 2020-08-24 22:10:42">2020-08-24</time></span><span class="article-meta"><span class="article-meta__separator">|</span><i class="fas fa-inbox"></i><a class="article-meta__categories" href="/categories/%E7%BC%96%E7%A8%8B/">编程</a></span></div><div class="content">并发测试 ab1. 安装1yum -y install httpd-tools
测试安装是否成功：
1234[root@vic html]# ab -VThis is ApacheBench, Version 2.3 &lt;$Revision: 655654 $&gt;Copyright 1996 Adam Twiss, Zeus Technology Ltd, http:&#x2F;&#x2F;www.zeustech.net&#x2F;Licensed to The Apache Software Foundation, http:&#x2F;&#x2F;www.apache.org&#x2F;
2. 参数说明
-n在测试会话中所执行的请求个数。默认时，仅执行一个请求。请求的总数量

-c一次产生的请求个数。默认是一次一个。请求的用户量

-t测试所进行的最大秒数。其内部隐含值是-n 50000，它可以使对服务器的测试限制在一个固定的总时间以内。默认时，没有时间限制。

-V显示版本号并退出。


3. 性能指标
吞吐量（Requests per second）


服务器并发处 ...</div></div></div><nav id="pagination"><div class="pagination"><span class="page-number current">1</span><a class="page-number" href="/page/2/#content-inner">2</a><a class="extend next" rel="next" href="/page/2/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="card-info-avatar is-center"><img class="avatar-img" src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/tou.jpg" onerror="this.onerror=null;this.src='/img/friend_404.gif'" alt="avatar"/><div class="author-info__name">兜里有糖</div><div class="author-info__description"></div></div><div class="card-info-data"><div class="card-info-data-item is-center"><a href="/archives/"><div class="headline">文章</div><div class="length-num">14</div></a></div><div class="card-info-data-item is-center"><a href="/tags/"><div class="headline">标签</div><div class="length-num">11</div></a></div><div class="card-info-data-item is-center"><a href="/categories/"><div class="headline">分类</div><div class="length-num">1</div></a></div></div><a class="button--animated" id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/dlytang"><i class="fab fa-github"></i><span>Follow Me</span></a><div class="card-info-social-icons is-center"><a class="social-icon" href="https://github.com/dlytang" target="_blank" title="Github"><i class="fab fa-github"></i></a><a class="social-icon" href="/472548557" target="_blank" title="QQ"><i class="fab fa-qq"></i></a><a class="social-icon" href="mailto:472548557@qq.com" target="_blank" title="QQ"><i class="fab fa-envelope-o"></i></a></div></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn card-announcement-animation"></i><span>公告</span></div><div class="announcement_content">欢迎</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/2021/08/22/program/2021-08-22-coding/" title="Coding"><img src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/coding.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Coding"/></a><div class="content"><a class="title" href="/2021/08/22/program/2021-08-22-coding/" title="Coding">Coding</a><time datetime="2021-08-22T21:20:19.000Z" title="发表于 2021-08-22 21:20:19">2021-08-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/08/22/program/2021-08-22-linuxTowindows/" title="Linux Windows"><img src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/linux_windows.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Linux Windows"/></a><div class="content"><a class="title" href="/2021/08/22/program/2021-08-22-linuxTowindows/" title="Linux Windows">Linux Windows</a><time datetime="2021-08-22T21:16:19.000Z" title="发表于 2021-08-22 21:16:19">2021-08-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/07/16/program/2021-07-16-wechaty/" title="Wechaty"><img src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/wechaty.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="Wechaty"/></a><div class="content"><a class="title" href="/2021/07/16/program/2021-07-16-wechaty/" title="Wechaty">Wechaty</a><time datetime="2021-07-16T21:16:19.000Z" title="发表于 2021-07-16 21:16:19">2021-07-16</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/05/15/program/2021-05-15-cloudreve/" title="个人网盘"><img src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/cloudreve.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="个人网盘"/></a><div class="content"><a class="title" href="/2021/05/15/program/2021-05-15-cloudreve/" title="个人网盘">个人网盘</a><time datetime="2021-05-15T21:16:19.000Z" title="发表于 2021-05-15 21:16:19">2021-05-15</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/2021/05/08/program/2021-05-08-docker/" title="docker"><img src= "/img/loading.gif" data-lazy-src="https://image.cwxhmk.top/blog/docker.jpg" onerror="this.onerror=null;this.src='/img/404.jpg'" alt="docker"/></a><div class="content"><a class="title" href="/2021/05/08/program/2021-05-08-docker/" title="docker">docker</a><time datetime="2021-05-08T20:16:19.000Z" title="发表于 2021-05-08 20:16:19">2021-05-08</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/categories/%E7%BC%96%E7%A8%8B/"><span class="card-category-list-name">编程</span><span class="card-category-list-count">14</span></a></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/tags/Linux/" style="font-size: 1.23em; color: #999ea6">Linux</a> <a href="/tags/Python/" style="font-size: 1.1em; color: #999">Python</a> <a href="/tags/blog/" style="font-size: 1.37em; color: #99a4b2">blog</a> <a href="/tags/coding/" style="font-size: 1.1em; color: #999">coding</a> <a href="/tags/mongo/" style="font-size: 1.1em; color: #999">mongo</a> <a href="/tags/nginx/" style="font-size: 1.1em; color: #999">nginx</a> <a href="/tags/python/" style="font-size: 1.1em; color: #999">python</a> <a href="/tags/%E5%B9%B6%E5%8F%91/" style="font-size: 1.1em; color: #999">并发</a> <a href="/tags/%E5%BC%80%E5%8F%91/" style="font-size: 1.1em; color: #999">开发</a> <a href="/tags/%E7%BC%96%E7%A8%8B/" style="font-size: 1.5em; color: #99a9bf">编程</a> <a href="/tags/%E9%83%A8%E7%BD%B2/" style="font-size: 1.1em; color: #999">部署</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/08/"><span class="card-archive-list-date">八月 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/07/"><span class="card-archive-list-date">七月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/05/"><span class="card-archive-list-date">五月 2021</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/04/"><span class="card-archive-list-date">四月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2021/02/"><span class="card-archive-list-date">二月 2021</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/09/"><span class="card-archive-list-date">九月 2020</span><span class="card-archive-list-count">1</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/archives/2020/08/"><span class="card-archive-list-date">八月 2020</span><span class="card-archive-list-count">6</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">14</div></div><div class="webinfo-item"><div class="item-name">已运行时间 :</div><div class="item-count" id="runtimeshow" data-publishDate="2020-08-24T00:00:00.000Z"></div></div><div class="webinfo-item"><div class="item-name">本站总字数 :</div><div class="item-count">12.3k</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2022-01-04T18:31:52.231Z"></div></div></div></div></div></div></main><footer id="footer" style="background-image: url('https://image.cwxhmk.top/blog/background.jpg')"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2022 By 兜里有糖</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div><div class="footer_custom_text"><a target="_blank" rel="noopener" href="https://www.upyun.com/?utm_source=lianmeng&utm_medium=referral">本站由<img src= "/img/loading.gif" data-lazy-src="/img/logo5.png" class="upyun"/> 提供CDN加速</a> <div href="https://beian.miit.gov.cn/#/Integrated/index"><img class="icp-icon" src= "/img/loading.gif" data-lazy-src="/img/icp.png"><span>备案号：陕ICP备20000393号</span></div></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><i class="fas fa-arrow-up"></i></button></div></div><div id="local-search"><div class="search-dialog"><div class="search-dialog__title" id="local-search-title">本地搜索</div><div id="local-input-panel"><div id="local-search-input"><div class="local-search-box"><input class="local-search-box--input" placeholder="搜索文章" type="text"/></div></div></div><hr/><div id="local-search-results"></div><span class="search-close-button"><i class="fas fa-times"></i></span></div><div id="search-mask"></div></div><div><script src="/js/utils.js"></script><script src="/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/instant.page/instantpage.min.js" type="module"></script><script src="https://cdn.jsdelivr.net/npm/vanilla-lazyload/dist/lazyload.iife.min.js"></script><script src="/js/search/local-search.js"></script><div class="js-pjax"><script>function subtitleType () {
  getScript('https://sdk.jinrishici.com/v2/browser/jinrishici.js').then(() => {
    jinrishici.load(function (result) {
      if (true) {
        var sub = "".length == 0 ? new Array() : "".split(',')
        var content = result.data.content
        var both = sub.unshift(content)
        var typed = new Typed('#subtitle', {
          strings: sub,
          startDelay: 300,
          typeSpeed: 150,
          loop: true,
          backSpeed: 50,
        })
      } else {
        document.getElementById('subtitle').innerHTML = result.data.content
      }
    })
  })
}

if (true) {
  if (typeof Typed === 'function') {
    subtitleType()
  } else {
    getScript('https://cdn.jsdelivr.net/npm/typed.js/lib/typed.min.js').then(subtitleType)
  }
} else {
  subtitleType()
}
</script></div><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.css" media="print" onload="this.media='all'"><script src="https://cdn.jsdelivr.net/npm/aplayer/dist/APlayer.min.js"></script><script src="https://cdn.jsdelivr.net/gh/metowolf/MetingJS@1.2/dist/Meting.min.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div></body></html>